﻿Public Class mainform

	Dim mousebutton As MouseButtons

	Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
		' populate grid

		For Each c As Char In rarmap.My.Settings.CharString
			ListView1.Items.Add(c)
		Next

	End Sub

	Private Sub ListView1_MouseUp(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ListView1.MouseUp
		' character clicked

		If ListView1.SelectedItems.Count = 0 Then Exit Sub

		Label1.Text += ListView1.SelectedItems.Item(0).Text
		Clipboard.SetText(Label1.Text)

		If e.Button = MouseButtons.Left Then
			Hide()
			SendKeys.SendWait("^v")
			Close()
		End If

		ListView1.SelectedItems.Clear()
	End Sub

	Private Sub ListView1_ItemMouseHover(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ListViewItemMouseHoverEventArgs) Handles ListView1.ItemMouseHover
		Label3.Text = e.Item.Text
	End Sub

	Private Sub ListView1_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ListView1.MouseMove
	End Sub

	Private Sub Form1_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
		rarmap.My.Settings.Save()
	End Sub
End Class
